import React, { Component } from 'react';

import List from './list.jsx';
import Detail from './detail.jsx';

class View extends Component {

    ifPage(id){
        if(id){
            return <List id={id}/>
        }else {
            return <Detail/>
        }
    }
    render(){
        return this.ifPage(this.props.match.params.id)
    }
}
export default View;
